3.53 \(\int \tan ^2(a+b x) \, dx\)

Optimal. Leaf size=14 \[ \frac{\tan (a+b x)}{b}-x \]

[Out]

-x + Tan[a + b*x]/b

________________________________________________________________________________________

Rubi [A]  time = 0.0081899, antiderivative size = 14, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {3473, 8} \[ \frac{\tan (a+b x)}{b}-x \]

Antiderivative was successfully verified.

[In]

Int[Tan[a + b*x]^2,x]

[Out]

-x + Tan[a + b*x]/b

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \tan ^2(a+b x) \, dx &=\frac{\tan (a+b x)}{b}-\int 1 \, dx\\ &=-x+\frac{\tan (a+b x)}{b}\\ \end{align*}

Mathematica [A]  time = 0.0071568, size = 23, normalized size = 1.64 \[ \frac{\tan (a+b x)}{b}-\frac{\tan ^{-1}(\tan (a+b x))}{b} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[a + b*x]^2,x]

[Out]

-(ArcTan[Tan[a + b*x]]/b) + Tan[a + b*x]/b

________________________________________________________________________________________

Maple [A]  time = 0.016, size = 19, normalized size = 1.4 \begin{align*}{\frac{\tan \left ( bx+a \right ) -bx-a}{b}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(b*x+a)^2*sin(b*x+a)^2,x)

[Out]

1/b*(tan(b*x+a)-b*x-a)

________________________________________________________________________________________

Maxima [A]  time = 1.48968, size = 24, normalized size = 1.71 \begin{align*} -\frac{b x + a - \tan \left (b x + a\right )}{b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+a)^2*sin(b*x+a)^2,x, algorithm="maxima")

[Out]

-(b*x + a - tan(b*x + a))/b

________________________________________________________________________________________

Fricas [B]  time = 1.82419, size = 72, normalized size = 5.14 \begin{align*} -\frac{b x \cos \left (b x + a\right ) - \sin \left (b x + a\right )}{b \cos \left (b x + a\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+a)^2*sin(b*x+a)^2,x, algorithm="fricas")

[Out]

-(b*x*cos(b*x + a) - sin(b*x + a))/(b*cos(b*x + a))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sin ^{2}{\left (a + b x \right )} \sec ^{2}{\left (a + b x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+a)**2*sin(b*x+a)**2,x)

[Out]

Integral(sin(a + b*x)**2*sec(a + b*x)**2, x)

________________________________________________________________________________________

Giac [A]  time = 1.1317, size = 24, normalized size = 1.71 \begin{align*} -\frac{b x + a - \tan \left (b x + a\right )}{b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+a)^2*sin(b*x+a)^2,x, algorithm="giac")

[Out]

-(b*x + a - tan(b*x + a))/b